.entity-view {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
}

.entity-title {
    height: 30px;
    background-color: rgb(168, 168, 168);
    display: flex;
    align-items: center;
    justify-content: center;
}

.entity-title ui-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgb(0, 0, 0);
}

.entity-list {
    flex: 1;
    overflow-y: auto;
    padding: 2px;
    display: flex;
    flex-direction: column;
}

.entity-group {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.group-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-top: 4px;
    padding-bottom: 4px;
    color: #ffffff;
}

.group-header:hover {
    color: #4a90e2;
}

.group-header:hover .arrow {
    border-left-color: #4a90e2;
}

.group-header ui-label {
    color: inherit;
    flex: 1;
}

.arrow {
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* border: 1px solid #ff0000; */
}

.arrow::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #ffffff;
    transition: transform 0.2s;
}

.arrow.expanded::before {
    transform: rotate(90deg);
}

.group-header:hover .arrow::before {
    border-left-color: #4a90e2;
}

.group-content {
    padding-left: 20px;
    margin-top: 4px;
}

.entity-item {
    padding: 3px 3px;
    margin: 2px 0;
    cursor: pointer;
    user-select: none;
}

.entity-item:hover {
    background-color: #212121;
    border-radius: 4px;
}

.entity-item.selected {
    background-color: #2a6e2a;
    border-radius: 4px;
}

.entity-item.selected:hover {
    background-color: #327832;
}

.entity-item.dragging {
    opacity: 0.5;
}

.group-header.drag-over,
.group-content.drag-over,
.ungrouped-entities.drag-over {
    background-color: rgba(74, 144, 226, 0.1);
    border-radius: 4px;
}

.ungrouped-entities {
    margin-top: 5px;
    padding: 5px 2px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 100px;
    flex: 1 0 auto;
}

.ungrouped-entities-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: rgb(255, 213, 0);
    padding: 2px 0;
}

.ungrouped-entities .entity-item {
    margin: 0;
    padding: 3px 5px;
    flex-shrink: 0;
}

.confirm-icon {
    color: #52c41a;
    cursor: pointer;
    opacity: 0.7;
    margin-left: 8px;
}

.confirm-icon:hover {
    opacity: 1;
}

.cancel-icon {
    color: #ff4d4f;
    cursor: pointer;
    opacity: 0.7;
    margin-left: 8px;
}

.cancel-icon:hover {
    opacity: 1;
}

.edit-area {
    display: flex;
    align-items: center;
    flex: 1;
}

.edit-area ui-input {
    flex: 1;
}

.entity-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.entity-item-content ui-label {
    flex: 1;
}

.delete-icon {
    color: #ff4d4f;
    cursor: pointer;
    opacity: 0;
    margin-left: 8px;
}

.entity-item:hover .delete-icon {
    opacity: 0.7;
}

.delete-icon:hover {
    opacity: 1 !important;
}